<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    console.log((function f(n){return ((n>1)? n*f(n-1):n)})(10)); //3628800   
    //10的阶乘  10*9*8*7*6*5*4*3*2*1
    </script>
</body>
</html>